package com.example.common.domain.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.example.common.domain.pojo.Converter.MapToListJsonConverter;
import com.example.common.domain.pojo.TypeHandler.MapJsonTypeHandler;
import com.example.common.domain.pojo.TypeHandler.MapListJsonTypeHandler;
import jakarta.persistence.Column;
import jakarta.persistence.Convert;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

@Data
@Slf4j
@AllArgsConstructor
@NoArgsConstructor
public class CourseOutline  {              //课程大纲
    @TableId(type = IdType.ASSIGN_UUID)
    private String courseId;
    /**
     * 课程教学目的
     */
    private String teachingObjectives;

    /**
     * 课程教学要求
     */
    private String teachingRequirements;

    /**
     * 先修课程
     */
    private String prerequisiteCourses;

    /**
     * 课程教学重难点
     */
    private String keyAndDifficultPoints;

    /**
     * 课程教学方法
     */
    private String teachingMethods;

//    @Convert(converter = MapToListJsonConverter.class)
    @Column(columnDefinition = "JSON") // 明确数据库字段类型为 TEXT
    @TableField(typeHandler = MapListJsonTypeHandler.class)
    Map<String, List<String>> teachingContent;
    private String teachingElements;  //老师内容(转json)

    /**
     * 重难点提示
     */
    private String keyPointsTips;
}
